package com.blackteachan.server.response;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 服务器响应实体
 * @author blackteachan
 * @since 2021-04-28 11:21
 */
@ApiModel(description = "服务器响应")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class ServerResponse<T> implements Serializable {

    private static final long serialVersionUID = -5044903625873962560L;

    @ApiModelProperty(value = "响应代码，200：成功，400：客户端错误，500：服务端错误")
    private Integer code;
    @ApiModelProperty(value = "响应消息", allowEmptyValue = true)
    private String msg;
    @ApiModelProperty(value = "数据", allowEmptyValue = true)
    private T data;

}
